package com.service.impl;

import com.dao.Goods2Dao;
import com.pojo.Goods2;
import com.service.Goods2Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author lifeng
 * @create 2022-11-21 18:46
 */
@Service
public class Goods2ServiceImpl implements Goods2Service {

    @Autowired
    private Goods2Dao goods2Dao;

    @Override
    public List<Goods2> findAllGoods() {
        return goods2Dao.selectList(null);
    }

    @Override
    public List<Goods2> findAllGoodsByTypeId(Integer id) {
        return goods2Dao.findByTypeId(id);
    }
}
